From 46a3d35ca3f76b2b2b0e3fdf9036ec1e279ef8cb Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 10 Jun 2011 10:47:23 +0200 Subject: [PATCH] xenpaging: start paging in the middle of gfn range Set the starting gfn to somewhere in the middle of the gfn range to avoid paging during BIOS startup. This can speedup booting of a guest. Signed-off-by: Olaf Hering Committed-by: Ian Jackson --- tools/xenpaging/policy_default.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/xenpaging/policy_default.c b/tools/xenpaging/policy_default.c index 83fe830309..0d32c94859 100644 --- a/tools/xenpaging/policy_default.c +++ b/tools/xenpaging/policy_default.c @@ -69,6 +69,10 @@ int policy_init(xenpaging_t *paging) /* Don't page out page 0 */ set_bit(0, bitmap); + /* Start in the middle to avoid paging during BIOS startup */ + current_gfn = max_pages / 2; + current_gfn -= paging->num_pages / 2; + rc = 0; out: return rc; -- 2.30.2